<template>
	<view class="content1 flex flex-col justify-start">
		
		<view class="colle1">
			<!-- <view class="flex flex-col w100">
				<view class="flex flex-col justify-start items-start item1" v-for="(item,index) in list" :key="index" @click="show(item,index)">
					<view class="daitem flex flex-row justify-between items-center w100">
						<text class="f_32 c_3d xian">{{item.name}}</text>
						<i class="iconfont icon-sjt c_80 f_32" v-if="item.show"></i>
						<i class="iconfont icon-sjt c_80 f_32"  v-else style="transform: rotateY(180deg); "></i>
					</view>
					<view class="flex flex-col justify-start infolist" v-for="(item1,index1) in item.info" :key="index1"  v-if="item.show">
						<view class="flex flex-row justify-start items-center">
							<view class="quan" style="width: 16rpx;height: 16rpx; background-color:#0256FFFF; margin-left: 30rpx; margin-right: 30rpx;border-radius: 50%;"></view>
							<view class="name flex flex-row justify-start f_28 c_3d" style="width: 150rpx;">
								{{item1.name}}
							</view>
							<view class="sex" style="width: 80rpx;">{{item1.sex}}</view>
							<view class="zu" style="width: 80rpx;">{{item1.minzu}}</view>
							<view class="zu" style="width: 260rpx; text-align: right;">
							<text class="f_28 c_9" style="margin-right: 8rpx;">手机</text>
							{{item1.phone}}</view>
						</view>
						
							<view class="flex flex-row justify-start items-center infolist">
								<view class="quan" style="width: 16rpx;height: 16rpx; background-color:#fff;margin-left: 30rpx; margin-right: 30rpx;border-radius: 50%;"></view>
						<view class="name flex flex-row justify-start f_28 c_3d" style="width: 300rpx;">
						 <text class="f_28 c_9" style="margin-right: 8rpx;">出生年月</text>{{item1.age}}
						</view>
						
						<view class="zu" style="width: 260rpx; text-align: right;"><text class="f_28 c_9" style="margin-right: 8rpx;">入党时间</text>
							{{item1.time}}</view>
							</view>
					</view>
					
				</view>
			</view> -->
			<view class="flex flex-col w100">
				<view class="flex flex-col justify-start items-start item1" v-for="(item,index) in list" :key="index" @click="show(item,index)">
					<!-- <view class="daitem flex flex-row justify-between items-center w100">
						<text class="f_32 c_3d xian">{{item.name}}</text>
						<i class="iconfont icon-sjt c_80 f_32" v-if="item.show"></i>
						<i class="iconfont icon-sjt c_80 f_32"  v-else style="transform: rotateY(180deg); "></i>
					</view> -->
					<view class="flex flex-col justify-start infolist"  >
						<view class="flex flex-row justify-start items-center">
							<view class="quan" style="width: 16rpx;height: 16rpx; background-color:#0256FFFF; margin-left: 30rpx; margin-right: 30rpx;border-radius: 50%;"></view>
							<view class="name flex flex-row justify-start f_28 c_3d" style="width: 150rpx;">
								{{item.name}}
							</view>
							<view class="sex" style="width: 80rpx;">{{item.gender}}</view>
							<view class="sex" style="width: 80rpx;">{{item.age}}</view>
							<view class="zu" style="width: 310rpx; text-align: right;">
							<text class="f_28 c_9" style="margin-right: 8rpx;">手机</text>
							{{item.mobile}}</view>
						</view>
						
							<view class="flex flex-row justify-start items-center infolist" style="margin-top: 10rpx;">
								<view class="quan" style="width: 16rpx;height: 16rpx; background-color:#fff;margin-left: 30rpx; margin-right: 30rpx;border-radius: 50%;"></view>
						<view class="name flex flex-row justify-start f_28 c_3d" style="width: 100%;">
						 <text class="f_28 c_9" style="margin-right: 8rpx;">类型</text>{{item.type}}
						</view>
						
						<!-- <view class="zu" style="width: 320rpx; text-align: right;"><text class="f_28 c_9" style="margin-right: 8rpx;">入党时间</text>
							{{item.jiondate}}</view>
							</view> -->
					</view>
				
					<view class="flex flex-row justify-start items-center infolist" style="margin-top: 10rpx;">
								<view class="quan" style="width: 16rpx;height: 16rpx; background-color:#fff;margin-left: 30rpx; margin-right: 30rpx;border-radius: 50%;"></view>
						<view class="name flex flex-row justify-start f_28 c_3d" style="width: 100%;">
						 <text class="f_28 c_9" style="margin-right: 8rpx;">描述：</text>{{item.description}}
						</view>
						
						<!-- <view class="zu" style="width: 320rpx; text-align: right;"><text class="f_28 c_9" style="margin-right: 8rpx;">入党时间</text>
							{{item.jiondate}}</view>
							</view> -->
					</view>
					<view class="info_all" style="padding-left:60rpx;">
						<view class="f_28 c_6d mt_20">
							<rich-text :nodes="item.descroption"></rich-text>
						</view>
						<view class="flex flex-row mt_20 w100 flex-wrap justify-between items-center" v-if="item.image">
							<view class="flex flex-row   "  >
								<image class="img_tu" :src="$util.img(item.image)" mode="scaleToFill"></image>
							</view>
							
						</view>
					</view>
				</view>
			</view>
			<view class="" v-if="list.length==0">
				<u-empty
				        mode="data"
				       text="暂无信箱"
				>
				</u-empty>
			</view>
		</view>
		</view>
	</view>
</template>

<script>
	import {
		getFormatDate,
		getFormatDatenow
	} from "@/common/js/util.js";

	import http from 'common/js/http.js';

	export default {
		 
		mixins: [http],
		data() {

			const [year, month, date] = getFormatDate().split("-");
			const [year1, month2, date2, hour2, minute2, second2] = getFormatDatenow().split("-");
			return {
				
				type:'',
				list:[
					
				
				]
				
			}
		},
		onLoad() {
	
		},
		onShow() {
		this.getlist()
		},
		methods: {
			getlist(){
				this.sendRequest({
					url: 'user/mypinion',
					data: {
						town_id: 1,
					},
					success: res => {
						console.log(res)
						if (res.code > 0) {
				
							this.list = res.data
						}
					}
				})
			},
			
		show(item,index){
			let a = item.show
			this.list.map(e=>{
				e.show=false
			})
			this.list[index].show=!a
		},
			getbanner() {
				this.sendRequest({
					url: 'cun/block',
					data: {
						town_id: 1
					},
					success: res => {
						console.log(res)
						if (res.code > 0) {

							this.list = res.data
						}
					}
				})
			},
			
		
		
		}
	}
</script>

<style lang="scss">
	.info_all{
		.img_tu{
		width: 288rpx;
		border-radius: 16rpx;
		height: 162rpx;	
		
		}
		
	}
	.infolist{
		padding: 20rpx 0;
		padding-top: 0;
		padding-bottom: 10rpx;
		width: 100%;
	}
	.xian{
		
		padding-left: 20rpx;
		position: relative;
	}
	
	.xian::before{
		position: absolute;
		left: 0;
		top:50%;
		margin-top: -15rpx;
		width: 6rpx;
		height: 30rpx;
		background-color: #0256FFFF;
		content: '';
		
	}
	.colle1{
		padding:20rpx;
		
		padding-top: 0;
		background-color: #fff;
		
	}
	
.top{
	padding: 40rpx;
	background-color: #fff;
	border-bottom: 1rpx solid #F9F9F9;
}
	page {
		background: #F9F9F9;
	}

	.item1{
		padding: 20rpx 0;
		border-bottom: 1rpx solid #f9f9f9;
	}
</style>